{% extends "common/default.html" %}
{% block common %}
<script type="text/javascript">
	function teacherDelete(id){
		if(confirm("确认要删除这条记录吗？")){
			$.post("../manager/manager_delete",{id:id},
				function(result){

					if(result=="success"){
						alert("删除成功!");
						window.location.href="../manager/teacher_list";
					}else{
						alert("删除失败");
					}
				}
			);
		}
	}
</script>
<div class="row search" >
  <div class="col-md-6">
	<form action="../manager/manager_search" method="post">
	    <div class="input-group" style="width: 300px">
		      <input type="text" class="form-control" name="content"  placeholder="请输入要查询的用户名...">
		      <span class="input-group-btn">
		        <button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search"></span>&nbsp;查询</button>
		      </span>
	    </div>
    </form>
  </div>
  <div class="col-md-6" >
    <button type="button"  style="float: right;" class="btn btn-primary" onclick="javascript:window.location.href='../manager/manager_add'">添加</button>
  </div>
</div>
<div>
	<table class="table table-hover  table-bordered table-striped" style="margin-bottom: 0px;">
		<tr>
		  	<th>序号</th>
		  	<th>用户名</th>
		  	<th>密码</th>
		  	<th>真实姓名</th>
		  	<th>职称</th>
            <th>身份证</th>
		  	<th>操作</th>
		  </tr>
		  {% for teacher in datas %}
		    <tr>
		  	    <td>{{teacher.id }}</td>
		  		<td>{{teacher.userName }}</td>
		  		<td>{{teacher.password }}</td>
		  		<td>{{teacher.trueName }}</td>
		  		<td>{{teacher.title }}</td>
                <td>{{ teacher.idcard }}</td>
		  		<td><button type="button" class="btn btn-danger btn-xs" onclick="teacherDelete({{teacher.id }})">删除</button></td>
		  	</tr>
		  {% endfor %}
	</table>
	<nav >
		<ul class="pagination">

		</ul>
	</nav>
</div>
{% endblock %}



